import { Component, Input, OnInit } from "@angular/core";
import { ActionPnode } from "src/app/@types/pnode";

@Component({
    selector: "action-pnode",
    template: `
        <ng-container [ngSwitch]="data.config.mode">
            <action-sms-pnode
                *ngSwitchCase="0"
                [data]="data.config"
            ></action-sms-pnode>
            <action-email-pnode
                *ngSwitchCase="1"
                [data]="data.config"
            ></action-email-pnode>
        </ng-container>
    `,
})
export class ActionComponent implements OnInit {
    @Input() data: ActionPnode;

    constructor() {}

    ngOnInit(): void {}
}
